﻿using System;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[RequireComponent(typeof(Button))]
public class UIQuitButton : MonoBehaviour
{
    [CompilerGenerated]
    private static UnityAction <>f__am$cache1;
    [CompilerGenerated]
    private static Action <>f__am$cache2;
    private Button button;

    private void Start()
    {
        this.button = base.GetComponent<Button>();
        if (<>f__am$cache1 == null)
        {
            <>f__am$cache1 = delegate {
                if (<>f__am$cache2 == null)
                {
                    <>f__am$cache2 = () => Application.Quit();
                }
                Singleton<UIMessageBox>.Instance.Show("Quit", "Quit the game?", <>f__am$cache2);
            };
        }
        this.button.onClick.AddListener(<>f__am$cache1);
    }
}

